﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace nextGeneration_app
{
    public partial class securitycheck : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                SetCaptchaText();
            }
            caplbl.Text = (string)Session["Captcha"];
        }
        private void SetCaptchaText()
        {
            Random oRandom = new Random();
            int iNumber = oRandom.Next(100000, 999999);
            Session["Captcha"] = iNumber.ToString();
        }

        protected void continuebtn_Click(object sender, EventArgs e)
        {
            if (captchatxb.Text != caplbl.Text)
            {
                messagelbl.Text = "Wrong";
            }
            else
            {
                Response.Redirect("ResetPassword.aspx");
            }
        }
      
    }
}